package store.lunangangster.engine.impl.agenda;

import store.lunangangster.engine.Agenda;
import store.lunangangster.engine.impl.entity.ExecutionEntity;
import store.lunangangster.engine.impl.interceptor.CommandContext;

/**
 * Operation用于描述应对当前运行中的流程做出何种操作，这种操作一般依赖于目前流程运行到哪个FlowElement对象。
 * 每个Operation应该关联一个{@link ExecutionEntity}对象，用于表示运行中的流程的某个执行分支
 *
 * <p>例如：
 * <ul>
 *   <li>{@link TakeOutGoingSequenceFlowOperation}表示当前FlowElement应找寻合法的OutGoingSequenceFlows</li>
 *   <li>{@link DoElementBehaviorOperation}表示应执行当前FlowElement的behavior</li>
 * </ul>
 * @author cwk
 * @version 1.0
 */
public interface Operation extends Runnable {

  ExecutionEntity getExecution();

  CommandContext getCommandContext();

  Agenda getAgenda();
}
